﻿using System;
using Gtk;

namespace GtkSharpTutorial
{
    class Program
    {
        static void delete_event(object obj, DeleteEventArgs args)
        {
            Application.Quit();
        }

        public static void Main(string[] args)
        {

            /* Initialize the toolkit */
            Application.Init();

            /* Create a new window */
            Window window = new Window("Arrow Buttons");

            /* It's a good idea to do this for all windows. */

            window.DeleteEvent += delete_event;

            /* Sets the border width of the window. */
            window.BorderWidth = 10;

            /* Create a box to hold the arrows/buttons */
            HBox box = new HBox(false, 0);
            box.BorderWidth = 2;
            window.Add(box);

            /* Pack and show all our widgets */

            //Tooltip tooltips;
            //Tooltips tooltips1 = new Tooltips();
            Widget button1 = new Button("button 1");
            button1.TooltipText = "这是 is button 1";
            //tooltips1.SetTip(button, "This is button 1", null);
            box.PackStart(button1, false, false, 3);
            box.Show();

            window.ShowAll();

            /* Rest in Application.Run() and wait for the fun to begin! */
            Application.Run();
        }
    }
}
